home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / Yaroze / UploadSrc / myecoff.h next >
Encoding:
C/C++ Source or Header  |  1997-07-06  |  1.6 KB  |  52 lines

  1. #ifndef _MYECOFF_H_
  2. #define _MYECOFF_H_
  3.  
  4. #define ECOFF_MIPS_MAGIC_LITTLE_SWAP 0x6201
  5.  
  6. struct Section
  7. {
  8.   UBYTE start;       // $2E
  9.   char  name[7];     // Name of section
  10.   ULONG what;        // Physical address
  11.   ULONG loadAddr;    // Load address (virtual address)
  12.   ULONG size;        // Size of section
  13.   ULONG fpos;        // Position in file (of raw data for section)
  14.   ULONG fpReloc;     // File ptr to relocation
  15.   ULONG fpLineNum;   // File ptr to line numbers
  16.   UWORD numReloc;    // #relocation entries
  17.   UWORD numLine;     // #line number entries
  18.   ULONG flags;       // Flags
  19. };
  20.  
  21. struct ecoff_file_hdr 
  22. {
  23.   unsigned short f_magic;    //  0. magic number
  24.   unsigned short f_nscns;    //  2. number of sections
  25.   unsigned int   f_timdat;    //  4. time & date stamp
  26.   unsigned int   f_symptr;    //  8. file pointer to symtab
  27.   unsigned int   f_nsyms;    // 12. number of symtab entries
  28.   unsigned short f_opthdr;    // 16. sizeof(optional hdr)
  29.   unsigned short f_flags;    // 18. flags
  30. };                // 20.
  31.  
  32. // a.out optional header
  33.  
  34. struct ecoff_aout_hdr 
  35. {
  36.   UWORD    a_magic;        //  0. type of file
  37.   UWORD    a_vstamp;        //  2. version stamp
  38.   ULONG a_tsize;        //  4. text size (nbytes) padded to FW bdry
  39.   ULONG a_dsize;        //  8. data size
  40.   ULONG a_bsize;        // 12. bss size
  41.   ULONG a_entry;        // 16. entry pt.
  42.   ULONG a_ftext;        // 20. base of text used for this file
  43.   ULONG a_fdata;        // 24. base of data used for this file
  44.   ULONG a_fbss;            // 28. base of bss used for this file
  45.   ULONG a_gprmask;        // 32. gpr register mask
  46.   ULONG a_cprmask[4];        // 36. co-processor register mask
  47.   ULONG a_gp;            // 52. value for gp register
  48. };                // 56.
  49.  
  50. #endif
  51.  
  52.